<template>
	<view class="container"style="background: linear-gradient(to right,#FF6B9D,#FFC107);">
		<text style="color: white;font-size: 18px;"></text>
		<text class="title">旺旺大礼包</text>
		<scroll-view class="task-list" scroll-y="true">
			<view class="task-item"@click="fus(1)">1. 我是</view>
			<view class="task-item"@click="fus(2)">2. 旺旺</view>
			<view class="task-item"@click="fus(3)">3. 大礼包</view>
			<view class="task-item"@click="fus(4)">4. 78</view>
			<view class="task-item"@click="fus(5)">5. 80</view>
			<view class="task-item"@click="fus(6)">6. 坤坤</view>
			<view class="task-item"@click="fus(7)">7. 美图</view>
		</scroll-view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {

		},
		methods: {
          fus(taskNum){
			// 根据任务序号设置不同跳转页面（可按需修改url）
			let targetUrl = "";
			switch(taskNum){
				case 1:
				case 2:
				case 3: // 示例：1-3号任务跳同一页面
					targetUrl = "/pages/index/fu";
					break;
				case 4:
				case 5: // 示例：4-5号任务跳另一页面
					targetUrl = "/pages/index/fu2";
					break;
				case 6:
				case 7: // 示例：6-7号任务跳第三个页面
					targetUrl = "/pages/index/fu3";
					break;
			}
			// 执行跳转
			uni.navigateTo({
			  	url: targetUrl
			})
		  }
	  }
	}
	</script>

<style>
	.container {
		padding: 15px;
	}
	.title {
		font-size: 20px;
		font-weight: bold;
		margin-bottom: 15px;
		display: block;
	}
	.task-list {
		height: 200px; /* 必须设置高度 */
		border: 1px solid #eee;
	}
	.task-item {
		padding: 12px;
		border-bottom: 1px solid #f0f0f0;
	}
</style>